package com.lanou.dllo.baisibudejie.application;

import android.app.Application;
import android.content.Context;

import com.lanou.dllo.baisibudejie.crash.CrashHandler;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by Risky on 15/10/21.
 */
public class BaseApplication extends Application {

    private static Context context;
    private static boolean isLogin = false;

    public static boolean isLogin() {
        return isLogin;
    }

    public static void setIsLogin(boolean isLogin) {
        BaseApplication.isLogin = isLogin;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        context = this;
        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);

        CrashHandler crashHandler = CrashHandler.getInstance();
        crashHandler.init(getApplicationContext());
//        context = getApplicationContext();
    }

    public static Context getContext() {
        return context;
    }
}
